Star Rating (with support for half stars)

Description

Example demonstrates a Star Rating control built with using SVG images that supports both whole and half stars.

Discussion

The Star Rating (with support for half stars) sample ViewBox control is a Star Rating control that supports both full and half stars. The sample uses SVG icons for the stars from the Alpha style sheet, which includes icons representing an empty, full, or half-filled star.

The icons are loaded using the A5.u.icon.html() function, which returns the HTML required to render an image. The function supports loading SVG images, CSS icons, or image files.

Depending on where the user taps or clicks an empty star, the star will either update to be half-filled or filled completely.

To learn more, watch the video below:

ViewBox Star Rating Control with Halfstar Support

2016-11-21

See Also